import request from '@/utils/request'

// 查询
export function getTagList(data) {
    return request({
      url: '/tag/list',
      method: 'post',
      data: data
    })
  }

// 查询
export function getTagAllList() {
  return request({
    url: '/tag/all/list',
    method: 'get'
  })
}

// 新增
export function addTag(data) {
    return request({
      url: '/tag/add',
      method: 'post',
      data: data
    })
  }

// 修改
export function updateTag(data) {
    return request({
      url: '/tag/update',
      method: 'post',
      data: data
    })
  }

// 获取标签列表
export function getTags() {
    return request({
      url: '/tag/all',
      method: 'get'
    })
  }
  
// 删除
export function deleteTag(id) {
    return request({
      url: '/tag/delete?id='+id,
      method: 'get'
    })
  }

// 批量删除
export function batchDeleteTag(data) {
    return request({
      url: '/tag/batch/delete',
      method: 'post',
      data: data
    })
  }

  export function getTagByStaffId(id) {
    return request({
      url: '/tag/staff/id?staffId='+id,
      method: 'get'
    })
  }
  export function getStaffBytagId(id) {
    return request({
      url: '/tag/staff/list?tagId='+id,
      method: 'get'
    })
  }
  export function queryStaffBytagId(data) {
    return request({
      url: '/tag/staff/list',
      method: 'post',
      data: data
    })
  }
